package com.ijunfu.lambda._09_optional;

import java.util.Optional;

/**
 *
 * @Title  : 转大写
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/18 14:27
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
public class Main {

    public static void main(String[] args) {
        String greeting = "Hello, World!";

        if(null!=greeting) {
            System.out.println(greeting.toUpperCase());
        }

        Optional.ofNullable(greeting).map(String::toUpperCase).ifPresent(System.out::println);
    }
}
